﻿@using Smart.Project.Data
@model MRole
@{
    Layout = null;
}
<link href="~/Content/css/styles.css" rel="stylesheet" />
<link href="~/Content/css/styles-blue.css" rel="stylesheet" />
<link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
<link href="~/Content/css/new-styles.css" rel="stylesheet" />

<script src="~/Content/js/vendors/jquery/jquery.min.js"></script>
<script src="~/Content/js/vendors/bootstrap/bootstrap.min.js"></script>
<script src="~/Content/js/vendors/form/jquery.form.min.js"></script>
<script src="~/Content/js/vendors/form/jquery.validate.min.js"></script>
<script src="~/Content/js/vendors/slimScroll/jquery.slimscroll.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {
            if ($("#mainForm").valid()) {
                $('#mainForm').ajaxSubmit(function (data) {
                    if (data == "true") {
                        parent.AlertInfo("编辑成功！", "success");
                    } else {
                        parent.AlertInfo("编辑失败！", "error");
                    }
                });
            }
        });
    });
</script>
<div class="powerwidget dark-red powerwidget-sortable" data-widget-editbutton="false" style="margin-bottom:0px">
    <div class="inner-spacer">
        <div id="slimScroll">
            @using (Html.BeginForm("Update", "Role", FormMethod.Post, new { @class = "form-horizontal", @id = "mainForm", @style = "margin-bottom:0px" }))
            {
            <fieldset>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="textinput">角色名称</label>
                    <div class="col-md-10">
                        @Html.HiddenFor(item => item.Id)
                        @Html.TextBoxFor(item => item.ROLENAME, new { @class = "form-control required", @readonly = "readonly" })
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="textinput">别名</label>
                    <div class="col-md-10">
                        @Html.TextBoxFor(item => item.BYNAME, new { @class = "form-control required", @readonly = "readonly" })
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-md-2 control-label" for="textinput">描述</label>
                    <div class="col-md-10">
                        @Html.TextBoxFor(item => item.DEPICT, new { @class = "form-control required", @readonly = "readonly" })
                    </div>
                </div>
            </fieldset>
            }
        </div>
    </div>
</div>


